home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 2
/
Atari Mega Archive CD - Volume 2.iso
/
minix
/
up1510b.tgz
/
up1510b
/
src
/
commands
/
kermit
/
ckuus2.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-07-19
|
26KB
|
886 lines
/* C K U U S 2 -- "User Interface" STRINGS module for Unix Kermit */
/*
Author: Frank da Cruz (SY.FDC@CU20B),
Columbia University Center for Computing Activities, January 1985.
Copyright (C) 1985, Trustees of Columbia University in the City of New York.
Permission is granted to any individual or institution to use, copy, or
redistribute this software so long as it is not sold for profit, provided this
copyright notice is retained.
*/
/* This module separates long strings from the body of the ckuser module. */
#include "ckcdeb.h"
#include <stdio.h>
#include <ctype.h>
#include "ckcker.h"
#include "ckucmd.h"
#include "ckuusr.h"
extern CHAR mystch, stchr, eol, seol, padch, mypadc, ctlq;
extern CHAR data[], *rdatap, ttname[];
extern char cmdbuf[], line[], debfil[], pktfil[], sesfil[], trafil[];
extern int nrmt, nprm, dfloc, deblog, seslog, speed, local, parity, duplex;
extern int turn, turnch, pktlog, tralog, mdmtyp, flow, cmask, timef, spsizf;
extern int rtimo, timint, npad, mypadn, bctr, delay;
extern int maxtry, spsiz, urpsiz, maxsps, maxrps, ebqflg, ebq;
extern int rptflg, rptq, fncnv, binary, pktlog, warn, quiet, fmask, keep;
extern int tsecs, bctu, len, atcapu, lpcapu, swcapu, wsize, sq, rpsiz;
extern int capas;
extern long filcnt, tfc, tlci, tlco, ffc, flci, flco;
extern char *dftty, *versio, *ckxsys;
extern struct keytab prmtab[];
extern struct keytab remcmd[];
#ifndef MINIX
static
char *hlp1[] = {
"\n",
" Usage: kermit [-x arg [-x arg]...[-yyy]..]]\n",
" x is an option that requires an argument, y an option with no argument:\n",
" actions (* options also require -l and -b) --\n",
" -s file(s) send (use '-s -' to send from stdin)\n",
" -r receive\n",
" -k receive to stdout\n",
" * -g file(s) get remote file(s) from server (quote wildcards)\n",
" -a name alternate name, used with -s, -r, -g\n",
" -x enter server mode\n",
" * -f finish remote server\n",
" * -c connect before transaction\n",
" * -n connect after transaction\n",
" settings --\n",
" -l line communication line device\n",
" -b baud line speed, e.g. 1200\n",
" -i binary file or Unix-to-Unix (text by default)\n",
" -p x parity, x is one of e,o,m,s,n\n",
" -t line turnaround handshake = xon, half duplex\n",
" -w don't write over preexisting files\n",
" -q be quiet during file transfer\n",
" -d log debugging info to debug.log\n",
" -e length (extended) receive packet length\n",
" If no action command is included, enter interactive dialog.\n",
""
};
/* U S A G E */
usage() {
conola(hlp1);
}
#else /* MINIX */
usage () {}
#endif /* MINIX */
/* Help string definitions */
#ifndef MINIX
static char *tophlp[] = { "\n\
Type ? for a list of commands, type 'help x' for any command x.\n\
While typing commands, use the following special characters:\n\n\
DEL, RUBOUT, BACKSPACE, CTRL-H: Delete the most recent character typed.\n\
CTRL-W: Delete the most recent word typed.\n",
"\
CTRL-U: Delete the current line.\n\
CTRL-R: Redisplay the current line.\n\
? (question mark) display help on the current command or field.\n\
ESC (Escape or Altmode) Attempt to complete the current field.\n",
"\
\\ (backslash) include the following character literally.\n\n\
From system level, type 'kermit -h' to get help about command line args.\
\n",
"" };
static char *hmxxbye = "\
Shut down and log out a remote Kermit server";
static char *hmxxclo = "\
Close one of the following logs:\n\
session, transaction, packet, debugging -- 'help log' for further info.";
static char *hmxxcon = "\
Connect to a remote system via the tty device given in the\n\
most recent 'set line' command";
static char *hmxxget = "\
Format: 'get filespec'. Tell the remote Kermit server to send the named\n\
files. If filespec is omitted, then you are prompted for the remote and\n\
local filenames separately.";
static char *hmxxlg[] = { "\
Record information in a log file:\n\n\
debugging Debugging information, to help track down\n\
(default debug.log) bugs in the C-Kermit program.\n\n\
packets Kermit packets, to help track down protocol problems.\n\
(packet.log)\n\n",
" session Terminal session, during CONNECT command.\n\
(session.log)\n\n\
transactions Names and statistics about files transferred.\n\
(transact.log)\n",
"" } ;
static char *hmxxlogi[] = { "\
Syntax: script text\n\n",
"Login to a remote system using the text provided. The login script\n",
"is intended to operate similarly to uucp \"L.sys\" entries.\n",
"A login script is a sequence of the form:\n\n",
" expect send [expect send] . . .\n\n",
"where 'expect' is a prompt or message to be issued by the remote site, and\n",
"'send' is the names, numbers, etc, to return. The send may also be the\n",
"keyword EOT, to send control-d, or BREAK, to send a break. Letters in\n",
"send may be prefixed by ~ to send special characters. These are:\n",
"~b backspace, ~s space, ~q '?', ~n linefeed, ~r return, ~c don\'t\n",
"append a return, and ~o[o[o]] for octal of a character. As with some \n",
"uucp systems, sent strings are followed by ~r unless they end with ~c.\n\n",
"Only the last 7 characters in each expect are matched. A null expect,\n",
"e.g. ~0 or two adjacent dashes, causes a short delay. If you expect\n",
"that a sequence might not arrive, as with uucp, conditional sequences\n",
"may be expressed in the form:\n\n",
" -send-expect[-send-expect[...]]\n\n",
"where dashed sequences are followed as long as previous expects fail.\n",
"" };
static char *hmxxrc[] = { "\
Format: 'receive [filespec]'. Wait for a file to arrive from the other\n\
Kermit, which must be given a 'send' command. If the optional filespec is\n",
"given, the (first) incoming file will be stored under that name, otherwise\n\
it will be stored under the name it arrives with.",
"" } ;
static char *hmxxsen = "\
Format: 'send file1 [file2]'. File1 may contain wildcard characters '*' or\n\
'?'. If no wildcards, then file2 may be used to specify the name file1 is\n\
sent under; if file2 is omitted, file1 is sent under its own name.";
static char *hmxxser = "\
Enter server mode on the currently selected line. All further commands\n\
will be taken in packet form from the other Kermit program.";
static char *hmhset[] = { "\
The 'set' command is used to establish various communication or file\n",
"parameters. The 'show' command can be used to display the values of\n",
"'set' parameters. Help is available for each individual parameter;\n",
"type 'help set ?' to see what's available.\n",
"" } ;
static char *hmxychkt[] = { "\
Type of packet block check to be used for error detection, 1, 2, or 3.\n",
"Type 1 is standard, and catches most errors. Types 2 and 3 specify more\n",
"rigorous checking at the cost of higher overhead. Not all Kermit programs\n",
"support types 2 and 3.\n",
"" } ;
static char *hmxyf[] = { "\set file: names, type, warning, display.\n\n",
"'names' are normally 'converted', which means file names are converted\n",
"to 'common form' during transmission; 'literal' means use filenames\n",
"literally (useful between like systems).\n\n",
"'type' is normally 'text', in which conversion is done between Unix\n",
"newlines and CRLF line delimiters; 'binary' means to do no conversion.\n",
"Use 'binary' for executable programs or binary data.\n\n",
"'warning' is 'on' or 'off', normally off. When off, incoming files will\n",
"overwrite existing files of the same name. When on, new names will be\n",
"given to incoming files whose names are the same as existing files.\n",
"\n\
'display' is normally 'on', causing file transfer progress to be displayed\n",
"on your screen when in local mode. 'set display off' is useful for\n",
"allowing file transfers to proceed in the background.\n\n",
"" } ;
static char *hmhrmt[] = { "\
The 'remote' command is used to send file management instructions to a\n",
"remote K